package com.heheda.www.controller;

import com.heheda.www.model.User;
import com.heheda.www.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 *
 * @date:2021/10/28 16:05
 * @author:呵呵哒
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Reference(version = "1.0.0")
    private UserService userService;

    @Reference(version = "2.0.0")
    private UserService userService2;

    @GetMapping("/detail")
    public User userDetail(Integer id){
        User user = userService.queryUserById(id);
        return user;
    }

    @GetMapping("/detail2")
    public User userDetail2(Integer id){
        User user = userService2.queryUserById(id);
        return user;
    }

}
